<h1><%= t 'views.book.index.title' %></h1>

<table>
  <tr>
    <th><%= Book.human_attribute_name(:title) %></th>
    <th><%= Book.human_attribute_name(:edition) %></th>
    <th><%= Book.human_attribute_name(:published) %></th>
    <th><%= Book.human_attribute_name(:genre) %></th>
    <th><%= Book.human_attribute_name(:tags) %></th>
    <th><%= Book.human_attribute_name(:users) %></th>
  </tr>

  <% @books.each do |book| %>
      <tr>
        <td><%= link_to book.title, book %></td>
        <td><%= book.edition %></td>
        <td><%= book.published %></td>
        <td><%= book.genre %></td>
        <td><%= book.tags %></td>
        <td><%= book.users_list %></td>
      </tr>
  <% end %>
</table>

<br/>

<%= button_to I18n.t('views.book.index.new'), new_book_path, method: :get %>
